package com.bdqn.t382.jd.controller;

import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.Date;

@Controller
public class ElectronicBackupsController {
    @RequestMapping("/add")
    public String add() {
        return "add";
    }

    @RequestMapping("/save")
    public String save(@RequestParam("id") int id,
                       @RequestParam("model") String model,
                       @RequestParam("price") BigDecimal price,
                       @RequestParam("time") String time, Model mo) {
        mo.addAttribute("id", id);
        mo.addAttribute("model", model);
        mo.addAttribute("price", price);
        mo.addAttribute("time", time);
        return "save";
    }
}
